#include "GameWindow.h"

GameWindow::GameWindow() {
	this->engine = new GameEngine();
}

GameWindow::GameWindow(GameEngine* engine) {
	this->engine = engine;
}



void GameWindow::initializeGL() {
	this->engine->init();
}
void GameWindow::resizeGL(int w, int h) {
	this->engine->resize(w, h);
}
void GameWindow::paintGL() {
	this->engine->loopGame();
	update();
}

void GameWindow::keyPressEvent(QKeyEvent* event) {
	this->engine->keyPressEvent(event);
}
void GameWindow::keyReleaseEvent(QKeyEvent* event) {
	this->engine->keyReleaseEvent(event);
}